package com.qili.entity.sys;

import com.qili.entity.supplier.ProjectPlace;
import com.qili.validator.group.AddGroup;
import com.qili.validator.group.UpdateGroup;
import lombok.Data;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;

@Table(name = "sys_user")
@Data
@ToString
public class SysUser implements Serializable {
    @Id
    @Column(name = "id")
    private String id;

    @NotEmpty(message = "用户名不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String username;

    @NotEmpty(message = "密码不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String password;

    @Transient
    private String code;

    @Transient
    private String oldPassword;

    @Column(name = "age")
    private Integer age;

    @Column(name = "email")
    private String email;

    @Column(name = "photo")
    private String photo;

    @Column(name = "real_name")
    private String realName;

    @Column(name = "create_by")
    private String createBy;

    @Column(name = "update_by")
    private String updateBy;

    @Column(name = "create_date")
    private Date createDate;

    @Column(name = "update_date")
    private Date updateDate;

    /**
     * 0可用1封禁
     */
    @Column(name = "del_flag")
    private Byte delFlag;

    /**
     * 手机号码
     */
    @Column(name = "phone_number")
    private String phoneNumber;

    /**
     * 学历
     */
    @Column(name = "education")
    private String education;

    /**
     * 省
     */
    @Column(name = "province")
    private String province;

    /**
     * 市
     */
    @Column(name = "city")
    private String city;

    /**
     * 县
     */
    @Column(name = "county")
    private String county;

    /**
     * 详细地址
     */
    @Column(name = "address")
    private String address;

    /**
     * 供需类型 001 供方 002 需方
     */
    @Column(name = "gx_type")
    private String gxType;

    /**
     * 个人/组织 001  002 组织
     */
    @Column(name = "person_type")
    private String personType;
    /**
     * 业务类型（监理、咨询、检测）
     */
    @Column(name = "yw_type")
    private String ywType;

    /**
     * 单位名称
     */
    @Column(name = "company_name")
    private String companyName;

    /**
     * 单位性质
     */
    @Column(name = "company_type")
    private String companyType;

    /**
     * 联系人
     */
    @Column(name = "link_person")
    private String linkPerson;

    /*
     *  身份证号
     */
    @Column(name = "card_id")
    private String cardId;

    /*
     *  性别
     */
    @Column(name = "sex")
    private String sex;
    /*
     *  组织机构代码
     */
    @Column(name = "jgcode")
    private String jgcode;
    /*
     *  标签个数
     */
    @Column(name = "num_tag")
    private String numTag;

    /*
     *  标签内容
     */
    @Column(name = "tags")
    private String tags;

    /**
     * 来源  001 正中人员  002  项目生成 --审核之后变成003  003自行注册
     */
    @Column(name = "source")
    private String source;

    /**
     * 擅长领域
     */
    @Column(name = "do_best")
    private String doBest;

    /**
     * 是否接受出差
     */
    @Column(name = "buss_travel")
    private String bussTravel;

    /**
     * 毕业院校
     */
    @Column(name = "school")
    private String school;

    /**
     * 专业
     */
    @Column(name = "major")
    private String major;

    /**
     * 民族
     */
    @Column(name = "nation")
    private String nation;

    /**
     * 婚育状况
     */
    @Column(name = "hy_status")
    private String hyStatus;

    /**
     * 政治面貌
     */
    @Column(name = "political")
    private String political;

    /**
     * 加入(党、团)时间
     */
    @Column(name = "join_political_time")
    private String joinPoliticalTime;

    /**
     * 籍贯
     */
    @Column(name = "birth_place")
    private String birthPlace;

    /**
     * 通讯地址
     */
    @Column(name = "post_address")
    private String postAddress;

    /**
     * 紧急联系人
     */
    @Column(name = "emergency_contact_name")
    private String emergencyContactName;

    /**
     * 紧急联系电话
     */
    @Column(name = "emergency_contract_number")
    private String emergencyContractNumber;

    /**
     * 血型
     */
    @Column(name = "blood_type")
    private String bloodType;

    /**
     * 星座
     */
    @Column(name = "constellation")
    private String constellation;

    /**
     * 属相
     */
    @Column(name = "zodiac")
    private String zodiac;

    /**
     * 个人公积金账号
     */
    @Column(name = "provident_fund_account_number")
    private String providentFundAccountNumber;

    /**
     * 出生年月日
     */
    @Column(name = "birthday")
    private String birthday;

    /**
     * 参加工作时间
     */
    @Column(name = "go_work_time")
    private String goWorkTime;

    /**
     * 到达公司时间
     */
    @Column(name = "arrival_company_time")
    private String arrivalCompanyTime;

    /**
     * 公司人员数量
     */
    @Column(name = "person_number")
    private String personNumber;

    /**
     * 本科及以上人员数
     */
    @Column(name = "bachelor_degree_above_number")
    private String bachelorDegreeAboveNumber;

    /**
     * 项目经理及以上人数
     */
    @Column(name = "project_manager_above_number")
    private String projectManagerAboveNumber;

    /**
     * 备注
     */
    @Column(name = "remark")
    private String remark;

    /**
     * 资料目录
     */
    @Column(name = "info_dic")
    private String infoDic;

    /**
     * 技术特长
     */
    @Column(name = "tech_special")
    private String techSpecial;

    /**
     * 其他特长
     */
    @Column(name = "other_special")
    private String otherSpecial;

    /**
     * 审核状态
     * 默认null    1审核通过    2审核拒绝    3审核中
     */
    @Column(name = "audit_status")
    private String auditStatus;

    /**
     * 审核拒绝原因
     */
    @Column(name = "audit_fail_reason")
    private String auditFailReason;

    /**
     * 最后登录时间
     */
    @Column(name = "last_login_time")
    private String lastLoginTime;

    @Transient
    private String roleId;

    @Transient
    private String workExJson;

    @Transient
    private ArrayList<SysUserEducation> educations;

    @Transient
    private ArrayList<SysUserFamily> familys;

    @Transient
    private ArrayList<SysUserWorkExperience> workExs;

    //负责地区
    @Transient
    private ArrayList<ProjectPlace> projectPlacedtos;

    @Transient
    private SysUserWorkExperience nowWork;

    @Transient
    private String codeId;
    @Transient
    private   ArrayList<String> qxlist;

    @Transient
    private String token;


    private static final long serialVersionUID = 1L;
}